﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DAL;
using MDL;

namespace BLL
{
    public class BLL_VipGrade
    {
        /// <summary>
        /// 查询会员等级信息
        /// </summary>
        /// <returns>会员等级信息</returns>
        public static List<VipGrade> SelectVipGrade()
        {
            return DAL_VipGrade.SelectVipGrade();
        }
        /// <summary>
        /// 查询是否已存在此会员名称
        /// </summary>
        /// <param name="name">要查的会员名称</param>
        /// <returns>是否有</returns>
        public static List<VipGrade> SelectVipName(string name)
        {
            return DAL_VipGrade.SelectVipName(name);
        }
        /// <summary>
        /// 添加会员等级
        /// </summary>
        /// <param name="name">会员名称</param>
        /// <param name="zk">会员折扣</param>
        /// <returns>受影响的行数</returns>
        public static int AddVipName(string name, string zk)
        {
            return DAL_VipGrade.AddVipName(name, zk);
        }
        /// <summary>
        /// 修改会员等级
        /// </summary>
        /// <param name="name">会员名称</param>
        /// <param name="zk">会员折扣</param>
        /// <param name="id">根据会员ID</param>
        /// <returns>受影响的行数</returns>
        public static int UpdateVipName(string name, string zk, int id)
        {
            return DAL_VipGrade.UpdateVipName(name, zk, id);
        }
        /// <summary>
        /// 删除会员等级
        /// </summary>
        /// <param name="id">根据会员ID</param>
        /// <returns>受影响的行数</returns>
        public static int DeleteVipName(int id)
        {
            return DAL_VipGrade.DeleteVipName(id);
        }
        /// <summary>
        /// 下拉绑定会员等级信息
        /// </summary>
        /// <returns>会员等级信息</returns>
        public static List<VipGrade> SelectVip()
        {
            return DAL_VipGrade.SelectVip();
        }
    }
}
